package dataImport.model;

import dataImport.model.abstracts.AbstractEntity;


public class CustomAction extends AbstractEntity {

	private static final long serialVersionUID = -3345785965324991345L;

	private Text pattern;

	public CustomAction(final String id, final Text pattern) {
		super(id);
		this.pattern = pattern;
	}
	
    public Text getPattern() {
    	return pattern;
    }

    public void setPattern(Text pattern) {
    	this.pattern = pattern;
    }

	@Override
    public int hashCode() {
	    final int prime = 31;
	    int result = super.hashCode();
	    result = prime * result + ((pattern == null) ? 0 : pattern.hashCode());
	    return result;
    }

	@Override
    public boolean equals(java.lang.Object obj) {
	    if (this == obj)
		    return true;
	    if (!super.equals(obj))
		    return false;
	    if (getClass() != obj.getClass())
		    return false;
	    CustomAction other = (CustomAction) obj;
	    if (pattern == null) {
		    if (other.pattern != null)
			    return false;
	    }
	    else if (!pattern.equals(other.pattern))
		    return false;
	    return true;
    }
}
